#ifndef TABLEDATA_H
#define TABLEDATA_H

#include <QObject>
#include <QWidget>
#include <QTableWidget>

class TableData:public QTableWidget
{
public:
    TableData(QWidget *parent = nullptr);
    void Init(){
        setColumnCount(5);
        setRowCount(5);
        /* 设置 tableWidget */
        setHorizontalHeaderLabels(QStringList() << "序号" << "规格" << "数量" << "占比" << "备注");
        auto Vh = verticalHeader();

        setSelectionBehavior(QAbstractItemView::SelectItems);   // 单个选中
        setSelectionMode(QAbstractItemView::ExtendedSelection);  // 可以选中多个


    }
    void RefreshData(std::vector<std::pair<std::string, int>> Items){


    }
};

#endif // TABLEDATA_H
